package com.financing.wap.dao.impl;


import java.sql.SQLException;
import java.util.List;

import org.springframework.stereotype.Repository;

import com.financing.wap.common.SqlName;
import com.financing.wap.dao.IDstMemberInfoDao;
import com.financing.wap.dto.DstMemberInfoDTO;
/**
 * dst_member_info  
 * 会员信息表 数据访问层实现类
 * @author huqiyun
 *
 */
 
@Repository("dstMemberInfoDao")
public class DstMemberInfoDaoImpl extends BaseDaoImpl<DstMemberInfoDTO, java.lang.Integer> implements IDstMemberInfoDao {


	@Override
	public int insert(DstMemberInfoDTO dstMemberInfo) throws SQLException {
		return (Integer) this.sqlMapClientTemplate.insert(SqlName.DstMemberInfoSql.insert, dstMemberInfo);
	}

	@Override
	public void update(DstMemberInfoDTO dstMemberInfo) throws SQLException {
		this.sqlMapClientTemplate.update(SqlName.DstMemberInfoSql.update, dstMemberInfo);
	}

	@Override
	public void updateForce(DstMemberInfoDTO dstMemberInfo) throws SQLException {
		this.sqlMapClientTemplate.update(SqlName.DstMemberInfoSql.updateForce, dstMemberInfo);
	}

	@Override
	public void delete(Integer id) throws SQLException {
		this.sqlMapClientTemplate.delete(SqlName.DstMemberInfoSql.delete,id);
	}
	
	@SuppressWarnings("unchecked")	
	@Override
	public List<DstMemberInfoDTO> queryList(DstMemberInfoDTO dstMemberInfo) throws SQLException {
		return this.sqlMapClientTemplate.queryForList(SqlName.DstMemberInfoSql.queryList, dstMemberInfo);
	}

	@Override
	public int queryListCount(DstMemberInfoDTO dstMemberInfo) throws SQLException {
		return (Integer) this.sqlMapClientTemplate.queryForObject(SqlName.DstMemberInfoSql.queryListCount, dstMemberInfo);
	}

	@Override
	public DstMemberInfoDTO loadById(Integer id) throws SQLException {
		return  (DstMemberInfoDTO)this.getSqlMapClientTemplate().queryForObject(SqlName.DstMemberInfoSql.loadById,id);
	}

	@Override
	public Class<DstMemberInfoDTO> getEntityClass() {
		return DstMemberInfoDTO.class;
	}
 	
}
